package edu.cmu.javadb;
import java.lang.reflect.*;

import edu.cmu.javadb.annotations.Record;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		System.out.println("load user program");
		try {
			ClassLoader loader = new JavaDBClassLoader(args);
			//loader = ClassLoader.getSystemClassLoader();
			Class<?> p = loader.loadClass("user.Person");
			Class<?> c = loader.loadClass("user.Program");
					
			Method mainMethod = c.getMethod("main", String[].class);						
			
			System.out.println("program begin");
			mainMethod.invoke(null, (Object)args);
						
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
